<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%><head>
	<title><fmt:message key="login.login.title" /></title>
</head>
<body>
	<h2><fmt:message key="login.tip" /></h2>

	<p><fmt:message key="login.tip.database" /></p>
	<c:url value="/logincheck" var="loginUrl"/>
	<form:form action="${loginUrl}" modelAttribute="loginForm" method="post">
		<form:errors cssClass="error"/>
		<table class="show">
			<tbody>
				<tr>
					<th><fmt:message key="login.username"/></th>
					<td>
						<form:input path="j_username" cssClass="required"/>
						<form:errors cssClass="error" path="j_username"/>
					</td>
				</tr>
				<tr class="odd">
					<th><fmt:message key="login.password"/></th>
					<td>
						<form:password path="j_password" cssClass="required"/>
					</td>
				</tr>
				<tr>
					<th><fmt:message key="login.rememberme"/></th>
					<td>
						<form:checkbox id="rememberme" path="_spring_security_remember_me"/>
					</td>
				</tr>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="2">
						<tags:button type="submit" key="login.submit" />
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<tags:a href="/login/passwordLost" key="login.passwordLost.title" />
					</td>
				</tr>
			</tfoot>
		</table>
	</form:form>
</body>
